<template>
	<view class="" style="width:100%;height: 100%;">
		<qiun-data-charts type="mount" :opts="lastOpts" :chartData="lastChartData" />
	</view>
</template>

<script>
	export default {
		data() {
			return {
				//山峰图
				lastChartData: {},
				lastOpts: {
					color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
						"#ea7ccc"
					],
					padding: [15, 15, 0, 5],
					// margin:10,
					//图例
					legend: {
						show:true,
						float: "left"
					},
					dataLabel:false,//不显示数值
					xAxis: {
						disableGrid: true
					},
					yAxis: {
						data: [{
							min: 0
						}]
					},
					extra: {
						mount: {
							type: "triangle",
							widthRatio: 1.5
						}
					}
				}

			}
		},
		mounted() {
			this.$api.goodsTypeTop().then(res => {
				console.log(res.data.data, '货物种类');
				let data = {
					series: [{
						data: res.data.data.map(el => {
							return {
								"name": el.content,
								"value": el.num
							}
						})
					}]
				}
				this.lastChartData =data
			})
		},
		methods: {

		},
	}
</script>

<style>

</style>
